class LocalStorageUtil {
	public static saveJson(key: string, params: any) {
		localStorage.setItem(key, JSON.stringify(params));
	}

	public static getJson(key: string): any {
		let value = localStorage.getItem(key);
		if (value != null) {
			return JSON.parse(value);
		}
		return null;
	}

	public static save(key: string, value: any) {
		localStorage.setItem(key, value);
	}

	public static get(key: string): any {
		return localStorage.getItem(key);
	}
}

export default LocalStorageUtil;